Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve endpoint description of some API endpoints #3509

Conversation

SamuelMartini
Copy link
Contributor

Description

This pr has commits meant to make some endpoint of the api doc clearer.

Checklist:

@@ -1030,7 +1033,7 @@ paths:
name: body
schema:
$ref: '#/definitions/address-book-input'
description: Updates a user's address book.
description: "Updates a user's address book.\n\n**Note**: if the passed `id` matches an existing `address` a new `Spree::Address` record will be created and the matched `address` `archived` on `Spree::UserAddress`. For a similar logic, if the passed `id` matches an existing `address` which is in `archived` state, the `Spree::UserAddress` record will be restored: `archived: false`. \n\nSee `user_address_book.rb` for further information."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not using |- as well here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kennyadsl,
fixed that description! https://github.com/solidusio/solidus/pull/3509/files#diff-a84e9b384a854939d2dc44eb24497283R1037

Now it is consistent with the rest of the text.

This commit provides some context on how the address book logic works when
managing user addresses.
Being Spree::CheckoutController a custom controller with not resource,
it may not be clear what `checkout_id` is.
One could not expect to advance the order state machine or to have a 422 response.
Documentation should warn on the deprecation of the method and provide
an alternative.
Explain that `id` paramenter is the coupon code
Better describe how the action only affect the classification position
@SamuelMartini SamuelMartini force-pushed the SamuelMartini/open_api_documentation_notes branch from cee4809 to c41339a Compare February 7, 2020 16:01
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thank you @SamuelMartini

@kennyadsl kennyadsl changed the title Samuel martini/open api documentation notes Improve endpoint description of some API endpoints Feb 7, 2020
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@spaghetticode spaghetticode merged commit 3c03aec into solidusio:master Feb 12, 2020
@spaghetticode spaghetticode deleted the SamuelMartini/open_api_documentation_notes branch February 12, 2020 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants